package com.example.module_home.Entity;

import android.support.annotation.NonNull;

import com.blankj.utilcode.util.TimeUtils;
import com.example.module_home.Utils.DialogUtil;

import java.util.Date;

/**
 * Created by Administrator on 2018/5/25 0025.
 */

public class SeenCodeInfo implements Comparable<SeenCodeInfo> {
    private Date currentDate;
    private CodeInfo info;

    public SeenCodeInfo(CodeInfo info, Date currentDate){
        this.info = info;
        this.currentDate = currentDate;
    }


    @Override
    public int compareTo(@NonNull SeenCodeInfo codeInfo) {
        int condition1 = info.getID()-codeInfo.getCodeInfo().getID();
        int condition2 = info.getKindID()-codeInfo.getCodeInfo().getKindID();
        return condition1==0?condition2:condition1;
    }

    public CodeInfo getCodeInfo() {
        return info;
    }

    public void setCodeInfo(CodeInfo info) {
        this.info = info;
    }

    public Date getCurrentDate() {
        return currentDate;
    }

    public void setCurrentDate(Date currentDate) {
        this.currentDate = currentDate;
    }
}
